/*
2021-8-17
https://www.acwing.com/problem/content/3809/
*/
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;
const int N=2e5+5;
char str[N];

int main()
{
    int T;
    cin>>T;
    while(T--)
    {
        int n;
        cin>>n>>str;
        for(int i=0;i<n;i++)
        {
            if(i==n-1)
            {
                str[i]=0;
                cout<<str<<endl;
                break;
            }
            else if(str[i]>str[i+1])
            {
                str[i]=0;
                cout<<str<<str+i+1<<endl;
                break;
            }
        }
    }
    return 0;
}
